﻿<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" ValidateRequest="false"  
    CodeFile="SendMail.aspx.vb" Inherits="WebForm_Mail_SendMail" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:HiddenField ID="hiUID" runat="server" />
            <asp:HiddenField ID="hiDBName" runat="server" />
            <asp:ObjectDataSource ID="dsAssetType" runat="server" SelectMethod="GetAssetType"
                TypeName="AssetManage.BBL.AssetBBL">
                <SelectParameters>
                    <asp:Parameter DefaultValue="1" Name="kind" Type="String" />
                    <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <asp:ObjectDataSource ID="dsMailParam" runat="server" SelectMethod="GetMailParamItem"
                TypeName="AssetManage.BBL.MailParamBBL">
                <SelectParameters>
                    <asp:Parameter DefaultValue="0" Name="kind" Type="String" />
                    <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <asp:ObjectDataSource ID="dsDeptID" runat="server" SelectMethod="GetDept" TypeName="OAMS.BBL.UsersBBL">
                <SelectParameters>
                    <asp:Parameter DefaultValue="1" Name="kind" Type="String" />
                    <asp:ControlParameter ControlID="hiDBName" Name="dbName" PropertyName="Value" Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
            <table border="1" width="1000px">
                <tr>
                    <td colspan="2" style="text-align: center">
                        <asp:Label ID="lblTitle" runat="server" meta:resourcekey="lblTitle" Font-Bold="True"
                            Font-Size="24px"></asp:Label>
                    </td>
                </tr>
                <tr style="vertical-align: text-top">
                    <td>
                        <ajaxToolkit:TabContainer ID="tcMain" runat="server" ActiveTabIndex="0" 
                            Width="100%">
                            <ajaxToolkit:TabPanel ID="GeneralPanel" runat="server" meta:resourcekey="GeneralPanel">
                                <ContentTemplate>
                                    <asp:UpdatePanel ID="UpdatePanel5" runat="server">
                                        <ContentTemplate>
                                            <table border="1">
                                                <tr>
                                                    <td align="right">
                                                        <asp:Label ID="lblParamID" runat="server" meta:resourcekey="lblParamID" Width="100px"></asp:Label>
                                                    </td>
                                                    <td colspan="3">
                                                        <asp:DropDownList ID="ddlParamID" runat="server" DataSourceID="dsMailParam" DataTextField="ParamDesc"
                                                            DataValueField="ParamID" AutoPostBack="True">
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                                
                                                <tr>
                                                    <td colspan="4">
                                                        <ajaxToolkit:TabContainer ID="tbBody" runat="server" ActiveTabIndex="0" CssClass="">
                                                            <ajaxToolkit:TabPanel ID="tbCht" runat="server" meta:resourceKey="tbCht">
                                                                <ContentTemplate>
                                                                    <table>
                                                                        <tr>
                                                                            <td align="right">
                                                                                <asp:Label ID="lblMailSubject" runat="server" meta:resourceKey="lblMailSubject"></asp:Label>
                                                                            </td>
                                                                            <td align="left">
                                                                                <asp:TextBox ID="txtMailSubject" runat="server" Width="700px"></asp:TextBox>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td align="right">
                                                                                <asp:Label ID="lblMailBody" runat="server" meta:resourceKey="lblMailBody"></asp:Label>
                                                                            </td>
                                                                            <td align="left" colspan="5">
                                                                                <FCKeditorV2:FCKeditor ID="txtMailBody" runat="server" BasePath="~/FCKeditor/" Height="200px"
                                                                                    Width="800px" ToolbarSet="ori_Default">
                                                                                </FCKeditorV2:FCKeditor>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </ContentTemplate>
                                                            </ajaxToolkit:TabPanel>
                                                            <ajaxToolkit:TabPanel ID="tbSimplified" runat="server" meta:resourcekey="tbsimplified">
                                                                <ContentTemplate>
                                                                    <table border="1">
                                                                        <tr>
                                                                            <td>
                                                                                <asp:Label ID="lblMailsubjectSimplified" runat="server" meta:resourceKey="lblMailsubjectSimplified"></asp:Label>
                                                                            </td>
                                                                            <td>
                                                                                <asp:TextBox ID="txtMailsubjectSimplified" runat="server" Width="500px"></asp:TextBox>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td>
                                                                                <asp:Label ID="lblMailBodySimplified" runat="server" meta:resourceKey="lblMailBodySimplified"></asp:Label>
                                                                            </td>
                                                                            <td>
                                                                                <FCKeditorV2:FCKeditor ID="txtMailBodyChn" runat="server" BasePath="~/FCKeditor/"
                                                                                    Height="200px" Width="800px" ToolbarSet="ori_Default">
                                                                                </FCKeditorV2:FCKeditor>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </ContentTemplate>
                                                            </ajaxToolkit:TabPanel>
                                                            <ajaxToolkit:TabPanel ID="tbEnglish" runat="server" meta:resourcekey="tbEnglish">
                                                                <ContentTemplate>
                                                                    <table border="1">
                                                                        <tr>
                                                                            <td>
                                                                                <asp:Label ID="lblMailsubjectEng" runat="server" meta:resourceKey="lblMailsubjectEng"></asp:Label>
                                                                            </td>
                                                                            <td>
                                                                                <asp:TextBox ID="txtMailSubjectEng" runat="server" Width="500px"></asp:TextBox>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td>
                                                                                <asp:Label ID="lblMailBodyEng" runat="server" meta:resourceKey="lblMailBodyEng"></asp:Label>
                                                                            </td>
                                                                            <td>
                                                                                <FCKeditorV2:FCKeditor ID="txtMailBodyEng" runat="server" BasePath="~/FCKeditor/"
                                                                                    Height="200px" Width="800px" ToolbarSet="ori_Default">
                                                                                </FCKeditorV2:FCKeditor>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </ContentTemplate>
                                                            </ajaxToolkit:TabPanel>
                                                        </ajaxToolkit:TabContainer>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right">
                                                        <asp:Label ID="lblDeptID" runat="server" meta:resourceKey="lblDeptID"></asp:Label>
                                                        &nbsp;
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtDept" runat="server" Width="60px"></asp:TextBox>
                                                        <asp:LinkButton ID="btnDept" runat="server">...</asp:LinkButton>
                                                    </td>
                                                    <td align="right">
                                                        <asp:Label ID="lblTopN" runat="server" meta:resourcekey="lblTopN"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtTopN" runat="server" Width="70px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right">
                                                        <asp:Label ID="lblAssetType" runat="server" meta:resourceKey="lblAssetType"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlAssetType" runat="server" DataSourceID="dsAssetType" DataTextField="name"
                                                            DataValueField="id">
                                                        </asp:DropDownList>
                                                    </td>
                                                    <td align="right">
                                                        <asp:Label ID="lblEquQty" runat="server" meta:resourceKey="lblEquQty"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtEquQty" runat="server" Width="70px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right">
                                                        <asp:Label ID="lblTakeOfficeDate" runat="server" meta:resourceKey="lblTakeOfficeDate"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtTakeOfficeDate" runat="server" Width="70px"></asp:TextBox>
                                                        <ajaxToolkit:CalendarExtender ID="txtTakeOfficeDate_CalendarExtender" runat="server"
                                                            Format="yyyy/MM/dd" TargetControlID="txtTakeOfficeDate">
                                                        </ajaxToolkit:CalendarExtender>
                                                    </td>
                                                    <td align="right">
                                                        <asp:Label ID="lblReturnDays" runat="server" meta:resourceKey="lblReturnDays"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtReturnDays" runat="server" Width="70px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" style="width: 10%">
                                                        <asp:Label ID="lblHouseID" runat="server" meta:resourceKey="lblHouseID"></asp:Label>
                                                    </td>
                                                    <td style="width: 50%">
                                                        <asp:DropDownList ID="ddlHouseID" runat="server">
                                                            <asp:ListItem meta:resourcekey="HouseID0"></asp:ListItem>
                                                            <asp:ListItem meta:resourcekey="HouseID1"></asp:ListItem>
                                                            <asp:ListItem meta:resourcekey="HouseID2"></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </td>
                                                    </td>
                                                    <td align="right" style="width: 10%">
                                                        <asp:Label ID="lblResendDays" runat="server" meta:resourceKey="lblResendDays"></asp:Label>
                                                    </td>
                                                    <td style="width: 30%">
                                                        <asp:TextBox ID="txtResendDays" runat="server" Width="70px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right" style="width: 10%">
                                                        &nbsp;
                                                    </td>
                                                    <td style="width: 50%">
                                                        &nbsp;
                                                    </td>
                                                    <td align="right">
                                                        <asp:Label ID="lblRendTimes" runat="server" meta:resourceKey="lblResendTimes"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="txtResendTimes" runat="server" Width="70px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="4" align="center">
                                                        <asp:UpdatePanel ID="UpdatePanel4" runat="server">
                                                            <ContentTemplate>
                                                                <asp:Button ID="btnSendNow" meta:resourceKey="btnSendNow" runat="server" />
                                                                <asp:GridView ID="GridView1" runat="server">
                                                                </asp:GridView>
                                                            </ContentTemplate>
                                                        </asp:UpdatePanel>
                                                    </td>
                                                </tr>
                                            </table>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </ContentTemplate>
                            </ajaxToolkit:TabPanel>
                            <ajaxToolkit:TabPanel ID="TestlPanel" runat="server" meta:resourcekey="TestPanel">
                                <ContentTemplate>
                                    <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                                        <ContentTemplate>
                                            <table border="1" width="300px">
                                                <tr>
                                                    <td align="right">
                                                        <asp:Label ID="lblMailBox" runat="server" meta:resourceKey="lblMailBox"></asp:Label>
                                                    </td>
                                                    <td style="width: 314px">
                                                        <asp:TextBox ID="txtMailBox" runat="server" Width="300px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right">
                                                        <asp:Label ID="lblAssetNo" runat="server" meta:resourceKey="lblAssetNo"></asp:Label>
                                                    </td>
                                                    <td style="width: 314px">
                                                        <asp:TextBox ID="txtAssetNo" runat="server" Width="100px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right">
                                                        <asp:Label ID="lblEmpNo3" runat="server" meta:resourceKey="lblEmpNo" Width="80px"></asp:Label>
                                                    </td>
                                                    <td style="width: 314px">
                                                        <asp:TextBox ID="txtEmpNo3" runat="server" Width="80px"></asp:TextBox>
                                                        <asp:Button ID="btnUID" runat="server" Text="..." />
                                                        <asp:TextBox ID="txtUserName" runat="server" BackColor="#CCCCCC" ReadOnly="True"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td colspan="2" align="center" id="2">
                                                        <asp:Button ID="btnTest" meta:resourceKey="btnTest" runat="server" 
                                                            style="height: 21px" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                                </ContentTemplate>
                            </ajaxToolkit:TabPanel>
                        </ajaxToolkit:TabContainer>
                    </td>
                    <td>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
